home *** CD-ROM | disk | FTP | other *** search
/ Larry Magid's Essential Internet / Larry Magid's Essential Internet (Quarterdeck Corporation)(1995).ISO / qsockpro.qip / CYBERSTR.MPS < prev    next >
Text File  |  1995-10-09  |  1KB  |  57 lines

  1. # Quarterdeck NSTN Inc. SLIP or PPP script
  2.  
  3. STRING username
  4. STRING password
  5. STRING IPaddress
  6. STRING framing
  7.  
  8. # TRACE ON
  9.  
  10. SetTimeout 60
  11.  
  12. # Get username from access method
  13. CfgGetValue "Username" username
  14. IF result = 0 THEN
  15.     ABORT "Can't load Username from qdeck.ini"
  16. ENDIF
  17.  
  18. # get password from access method
  19. CfgGetValue "Password" password
  20. IF result = 0 THEN
  21.     ABORT "Can't load Password from qdeck.ini"
  22. ENDIF
  23.  
  24. # get framing from access method
  25. CfgGetValue "Framing" framing
  26. IF result = 0 THEN
  27.     ABORT "Can't load Framing (SLIP or PPP) from qdeck.ini"
  28. ENDIF
  29.  
  30. DELAY 2
  31. # CommSend "%r"
  32. # DELAY 2
  33. # CommSend "%r"
  34.  
  35. CommWaitFor    "ogin:"
  36.     CommSend username
  37.     IF framing = "MPSLIP" THEN
  38.         CommSend "%%nocslip%r"
  39.     ELSE
  40.         CommSend "%%ppp%r"
  41.     ENDIF
  42.  
  43. CommWaitFor    "assword:"
  44.     CommSend password
  45.     CommSend "%r"
  46.  
  47. # CommWaitFor "annex:"
  48.  
  49. IF framing = "MPSLIP" THEN
  50.     CommWaitFor ") to"
  51.         CommReadIPaddr IPAddress                   # IP address should be next word
  52.         CfgSetValue    "IPAddress" IPaddress     # store the IP address
  53.     PRINT "IPAddress ="; IPAddress
  54. ENDIF
  55.  
  56. END
  57.